<!DOCTYPE html>
<title>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
</head>
<body>
    <div class="container">
        <h1>Bootstrap导航条</h1>
        <div class="tab-pane fade" id="p1">
            <p>这是第首页</p>
        </div>
        <div class="tab-pane fade" id="p2">
            <p>这是第二页</p>
        </div>
        <div class="tab-pane fade" id="p3">
            <p>这是第三页</p>
        </div>
        <nav class="navbar navbar-inverse">
            <div class="container-fluid">
                <!--头部-->
                <div class="navbar-header">
                    <button class="navbar-toggle" data-toggle="collapse" data-target="#dxsh">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a href="# " class="navbar-brand">大学生活</a>
                </div>
                <!--菜单部分-->
                <div class="collapse navbar-collapse" id="dxsh">
                    <ul class="nav navbar-nav">
                        <li class="active">
                            <a href="#">学习</a>
                        </li>
                        <li>
                            <a href="#">吃饭</a>
                        </li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            更多精彩     
                            <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="#">海绵宝宝</a>
                                </li>
                                <li>
                                    <a href="#">章鱼哥</a>
                                </li>
                                <li>
                                    <a href="#">派大星</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
</body>